package com.xinqi.modules.course.image.manager;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinqi.common.mybatis.data.service.BaseService;
import com.xinqi.modules.course.image.dto.req.CourseImageQueryDTO;
import com.xinqi.modules.course.image.dto.rsp.CourseImageResultDTO;
import com.xinqi.modules.course.image.domain.CourseImageEntity;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 课程背景封面图表管理层
 *
 * @author: system
 * @date: 2023/03/22
 */
public interface CourseImageManager extends BaseService<CourseImageEntity> {

    /**
     * 自定义分页查询
     */
    Page<CourseImageResultDTO> findPage(Page<Object> page, CourseImageQueryDTO query);

    /**
     * 自定义列表查询
     */
    List<CourseImageResultDTO> findList(CourseImageQueryDTO query);

    /**
     * 根据id查询 课程背景封面图表数据
     */
    CourseImageEntity findById(Long id);

    /**
     * 根据id删除 课程背景封面图表数据
     */
    @Transactional(rollbackFor = Exception.class)
    boolean deleteById(Long id);
}